<template>
  <el-dialog
    :visible.sync="dialogVisible"
    :before-close="handleClose"
    :close-on-click-modal="false"
    title="新增"
    width="50%">
    <dynForm
      :info-form="searchForm"
      :search-tags="searchTags"
      :select-list="selectList"
      :form-attr="formAttr"
    />
    <span slot="footer">
      <el-button type="primary" icon="el-icon-receiving" >{{
        $t("save")
      }}</el-button>
      <el-button icon="el-icon-delete">{{
        $t("reset")
      }}</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  name: 'OfflineWarrantyForm',
  data() {
    return {
      dialogVisible: true,
      searchForm: {},
      searchTags: [
        { label: '设备型号', prop: 'name', tag: 'DynSelect' },
        { label: '设备编号', prop: 'name', tag: 'DynInput' },
        { label: '一级问题分类', prop: 'name', tag: 'DynSelect' },
        { label: '二级问题分类', prop: 'name', tag: 'DynSelect' },
        { label: '提交部门', prop: 'name', tag: 'DynSelect', width: '100%' },
        { label: '问题描述', prop: 'name', tag: 'DynTextarea', width: '100%', row: 2 }
      ],
      formAttr: {},
      selectList: {}
    }
  },
  methods: {
    handleOpen() {
      this.dialogVisible = true
    },
    handleClose() {
      this.dialogVisible = false
    }
  }
}
</script>

<style scoped lang="scss">
  ::v-deep .el-form-item:last-child{
      .el-form-item__content{
        width: 60%;
      }
  }
</style>
